package net.orange.framework.logic;

import java.util.Collection;

import net.orange.architecture.db.Condition;
import net.orange.architecture.db.Conditions;
import net.orange.architecture.process.BaseProcess;
import net.orange.framework.model.Department;

/**
 * The group business logical process object which implement the IGroupProcess
 * interface.
 */
public class GroupProcess extends BaseProcess implements IGroupProcess {
	/*
	 * (non-Javadoc)
	 * 
	 * @see net.orange.framework.logic.IGroupProcess#find(net.orange.framework.model.Department)
	 */
	public Collection find(Department department) throws Exception {
		if (department == null)
			return null;

		Conditions cnds = new Conditions();
		cnds.add(new Condition("department.pk", department.getPk()));

		return dao.list(cnds);
	}
}